﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections;
using System.Data;
using TaoBaoProject.WebModel;
namespace TaoBaoProject.Handler.RegisterHandler
{
    /// <summary>
    /// Summary description for ImportRegisterHandler
    /// </summary>
    public class ImportRegisterHandler : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string filepath = context.Request.Params["filepath"].ToString();

            string fileExt = System.IO.Path.GetExtension(filepath);
            //if (fileExt != ".xls")
            //{
            //    return;
            //}

            string FullName = ExcelOperate.GetFilePath(HttpContext.Current.Request, filepath);
            //ArrayList SheetNames = ExcelOperate.GetSheetName(FullName);  //获取xls文件的各个表名
            //DataSet ds = ExcelOperate.SaveXlsToDataSet(FullName, SheetNames);
            //ExcelOperate.DeleteXlsFile(FullName);
            //DataTable dt = ds.Tables[0];

            context.Response.Write("Hello World");
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}